import service from '/@/utils/request_types';
import { AxiosRequestConfig } from 'axios';
import { NumberFormatOptions } from '@intlify/core-base';

interface MyResponseType<T = any> {
	code: number;
	message: string;
    extras: any;
    success: boolean
    timestamp: number
    data: T;
}

const request = async <T = any>(config: AxiosRequestConfig): Promise<MyResponseType<T>> => {
	let res = await service.request<MyResponseType<T>>(config);
	return res.data
};

export default request